﻿using JobManageBLL.Config;
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using JobManageBLL.ReNotNull;
using JobManageCommon.DiskPartition;
using JobManageCommon.Common;
using JobManageCommon.Helper;
using System.Threading;
using JobManageModel.BaseConfig;

namespace WinJobManage
{
    public partial class JobMain : Form
    {
        JobManageModel.Manage_JobModel.JobManageModel _jobManageModel = new JobManageModel.Manage_JobModel.JobManageModel();
        DBConfig _dBConfig = new DBConfig(Application.StartupPath + @"\key.ini");
        DBConfig _SetInfoConfig = new DBConfig(Application.StartupPath + @"\Setinfo.ini");
        DBConfig _logConfig = new DBConfig(Application.StartupPath + @"\20210504.ini");
        public JobMain()
        {
            InitializeComponent();
        }
        /// <summary>
        /// 窗体加载
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void JobMain_Load(object sender, EventArgs e)
        {
            _logConfig = new DBConfig(Application.StartupPath + @"\20210504.ini");
            _jobManageModel.Fingerprint = _dBConfig.IniReadValue("ChiaKey", "Fingerprint");
            if (!_logConfig.existini() || _jobManageModel.Fingerprint == "")
            {
                Fingerprint_text.Enabled = false;
                MessageBox.Show("非法使用");
                BaseConfig.isok = false;
                return;
            }
            else
            {

                List<int> comboBox_jobnum = new List<int>() { 10, 15, 20, 25, 30, 35, 40, 50, 60, 70, 80 };
                comboBox_JobNum.DataSource = comboBox_jobnum;
                BaseConfig.isok = true;
                ConfigInfo();
            }
        }
        public static List<string> add_drive = new List<string> { };
        public static List<string> add_drivecache = new List<string> { };

        /// <summary>
        ///  SSD 固态硬盘
        /// </summary>
        public static List<string> add_SSDDrivecache = new List<string> { };

        /// <summary>
        /// SSD 固态临时缓存
        /// </summary>
        public static List<string> add_SSDDrivecachetem = new List<string> { };
        /// <summary>
        /// 选择SSD
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button1_Click(object sender, EventArgs e)
        {
            FolderBrowserDialog path = new FolderBrowserDialog();
            path.ShowDialog();
            var currtue = path.SelectedPath;
            if (!add_drive.Contains(currtue) && currtue != "")
            {
                driver_SSD_lable.Text += "磁盘" + (add_SSDDrivecache.Count + 1) + "  :" + currtue + "\n";
                if (currtue != "" || !add_SSDDrivecache.Contains(currtue))
                {
                    add_SSDDrivecache.Add(currtue);
                }
            }
            _jobManageModel.CacheDrive = add_SSDDrivecache;
            string info = string.Format(@" 
缓存盘信息
磁盘:{0} 
总容量:  {1}  
剩余容量:  {2}   
 ", currtue, Common.HumanReadableFilesize(HardDiskPartition.GetHardDiskSpace(currtue)), Common.HumanReadableFilesize(HardDiskPartition.GetHardDiskFreeSpace(currtue)));
            Dirvie_info.Text += info;

        }

        /// <summary>
        /// 任务选择
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void radioButton_CheckedChanged(object sender, EventArgs e)
        {
            //如果选择更多 
            if (radioButton_more.Checked)
            {
                _jobManageModel.IsJobCheck = true;
                this.comboBox_JobNum.Visible = true;
            }
            else
            {
                this.comboBox_JobNum.Visible = false;
            }

            if (radioButton1.Checked)
            {


                _jobManageModel.IsJobCheck = true;
                _jobManageModel.JobNum = 1;

            }
            if (radioButton2.Checked)
            {

                _jobManageModel.IsJobCheck = true;
                _jobManageModel.JobNum = 3;

            }
            if (radioButton5.Checked)
            {
                _jobManageModel.IsJobCheck = true;
                _jobManageModel.JobNum = 5;
            }

        }

        /// <summary>
        ///  并发+队列执行
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void radioButton3_CheckedChanged(object sender, EventArgs e)
        {
            _jobManageModel.ModeType = 0;
        }
        /// <summary>
        /// 队列执行
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void radioButton4_CheckedChanged(object sender, EventArgs e)
        {
            _jobManageModel.ModeType = 1;
        }

        /// <summary>
        /// 盘符选择
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param> 
        private void button2_Click(object sender, EventArgs e)
        {
            FolderBrowserDialog path = new FolderBrowserDialog();
            path.ShowDialog();
            var currtue = path.SelectedPath;
            if (!add_drive.Contains(currtue))
            {
                Drivie_2.Text += "存储盘信息:\n\t" + currtue + " 总容量: " + Common.HumanReadableFilesize(HardDiskPartition.GetHardDiskSpace(currtue));
                Drivie_2.Text += "   剩余容量: " + Common.HumanReadableFilesize(HardDiskPartition.GetHardDiskFreeSpace(currtue));
                if (currtue != "")
                {
                    add_drive.Add(currtue);
                }
                _jobManageModel.DriveLetter = add_drive;
            }
            driver_lable.Text = "";
            foreach (var item in add_drive)
            {
                driver_lable.Text += item + "\n";
            }
        }

        /// <summary>
        /// 钱包地址保存
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button3_Click(object sender, EventArgs e)
        {
            // 账户      √
            // 密钥      √
            // 池公钥    √
            // SSD缓存   √
            // 任务选择  √
            // 任务间隔  √
            // 执行方式  √
            // 硬盘选择  √

            _jobManageModel.Fingerprint = Fingerprint_text.Text.Trim();
            _jobManageModel.FarmerKey = FarmerKey.Text.Trim();
            _jobManageModel.PoolKey = PoolKey.Text.Trim();
            _jobManageModel.sjjiang = _jiange.Text.Trim();
            _jobManageModel.KModel = comboBox1.Text.Trim();
            _jobManageModel.ThreadNum = comboBox2.Text.Trim();
            if (NotNull.IsNotNull(_jobManageModel.Fingerprint))
            {
                MessageBox.Show("请输入账户");
                return;
            }
            if (NotNull.IsNotNull(_jobManageModel.sjjiang))
            {
                MessageBox.Show("请输入任务间隔时间");
                return;
            }
            if (NotNull.IsNotNull(_jobManageModel.FarmerKey))
            {
                MessageBox.Show("请输入Farmer Key");
                return;
            }
            if (NotNull.IsNotNull(_jobManageModel.PoolKey))
            {
                MessageBox.Show("请输入Pool Key");
                return;
            }

            if (_jobManageModel.CacheDrive == null || _jobManageModel.CacheDrive.Count < 1)
            {
                MessageBox.Show("请输入缓存盘路径");
                return;
            }
            if (_jobManageModel.JobNum < 1)
            {
                MessageBox.Show("请选择执行任务数");
                return;
            }

            if (_jobManageModel.DriveLetter == null || _jobManageModel.DriveLetter.Count < 1)
            {
                MessageBox.Show("请选择最少一个盘符");
                return;
            }
            if (_jobManageModel.IsJobCheck != true)
            {
                MessageBox.Show("您的任务数未配置,将按照默认10个任务数进行!");
            }
            if (radioButton1.Checked)
            {
                _jobManageModel.JobNum = 1;
            }else
            if (radioButton3.Checked)
            {
                _jobManageModel.JobNum = 3;
              
            }else
            if (radioButton5.Checked)
            {
                _jobManageModel.JobNum = 5;
            }
            if (radioButton_more.Checked)
            {
                int num = int.Parse(comboBox_JobNum.Text.Trim());
                _jobManageModel.JobNum = num;
            }
            if (BaseConfig.isok == false)
            {
                MessageBox.Show("非法使用");
            }
            //账户信息保存
            var i1 = _dBConfig.IniWriteValue("ChiaKey", "Fingerprint", _jobManageModel.Fingerprint.Trim());
            var i2 = _dBConfig.IniWriteValue("ChiaKey", "FarmerKey", _jobManageModel.FarmerKey.Trim());
            var i3 = _dBConfig.IniWriteValue("ChiaKey", "PoolKey", _jobManageModel.PoolKey.Trim());
            var i1_1 = _dBConfig.IniWriteValue("ChiaKey", "GuidTime", MD5Helper.MD5(_jobManageModel.Fingerprint));
            var i1_2 = _SetInfoConfig.IniWriteValue("BaseConfig", "KModel", _jobManageModel.KModel.ToString());
            var i1_ = _SetInfoConfig.IniWriteValue("BaseConfig", "ThreadNum", _jobManageModel.ThreadNum.ToString()==""?"3":_jobManageModel.ThreadNum.ToString());

            //配置信息保存 
            var i5 = _SetInfoConfig.IniWriteValue("BaseConfig", "JobNum", _jobManageModel.JobNum.ToString());
            var i6 = _SetInfoConfig.IniWriteValue("BaseConfig", "ModeType", _jobManageModel.ModeType.ToString().Trim());
            _SetInfoConfig.IniWriteValue("BaseConfig", "jiange", _jobManageModel.sjjiang.ToString().Trim());
            int i = 0, j = 0;
            ///SSD 固态硬盘数
            _SetInfoConfig.IniWriteValue("DriveSSD", "CacheDriveCount", _jobManageModel.CacheDrive.Count.ToString());
            /// 建议的机械硬盘数
            _SetInfoConfig.IniWriteValue("DriveJX", "DriveLetterCount", _jobManageModel.DriveLetter.Count.ToString());
            ///SSD 缓存盘
            foreach (var item in _jobManageModel.CacheDrive)
            {
                _SetInfoConfig.IniWriteValue("DriveSSD", "CacheDrive" + j, item);
                j++;
            }
            /// 机械硬盘
            foreach (var item in _jobManageModel.DriveLetter)
            {
                _SetInfoConfig.IniWriteValue("DriveJX", "DriveLetter" + i, item);
                i++;
            }
            if (i1 && i2 && i3 && i5 && i6)
            {
                var tips = "保存成功" + _jobManageModel.ThreadNum == "" ? "您的线程数未选择,默认为3" : "" + "保存成功";
                MessageBox.Show(tips,"系统提示");
              //  Job_Log.Text += DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "  配置信息保存成功\n";
                ConfigInfo();
            }
            else
            {
                MessageBox.Show("配置信息部分保存成功,请重试");
                ConfigInfo();
              //  Job_Log.Text += DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "  配置信息部分保存成功\n";
            }
        }
        /// <summary>
        /// 任务启动
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Job_Start_Click(object sender, EventArgs e)
        {
            _jobManageModel.Fingerprint = Common.GetListOfSplitEnter(Fingerprint_text.Text.Trim());
            _jobManageModel.FarmerKey = Common.GetListOfSplitEnter(FarmerKey.Text.Trim());
            _jobManageModel.PoolKey = Common.GetListOfSplitEnter(PoolKey.Text.Trim());
            if (NotNull.IsNotNull(_jobManageModel.Fingerprint))
            {
                MessageBox.Show("请输入账户.");
                return;
            }
            if (NotNull.IsNotNull(_jobManageModel.FarmerKey))
            {
                MessageBox.Show("请输入Farmer Key.");
                return;
            }
            if (NotNull.IsNotNull(_jobManageModel.sjjiang))
            {
                MessageBox.Show("请输入任务时间间隔.");
                return;
            }
            if (NotNull.IsNotNull(_jobManageModel.PoolKey))
            {
                MessageBox.Show("请输入Pool Key");
                return;
            }
            if (_jobManageModel.CacheDrive == null || _jobManageModel.CacheDrive.Count < 1)
            {
                MessageBox.Show("请输入缓存盘路径");
                return;
            }
            if (_jobManageModel.JobNum < 1)
            {
                MessageBox.Show("请选择执行任务数");
                return;
            }

            var Administrator = _dBConfig.IniReadValue("ChaiInfo", "Administrator");
            var Version = _dBConfig.IniReadValue("ChaiInfo", "appversion");
            if (Administrator == "")
            {
                MessageBox.Show("您的Windows账户未填写,请前往密钥获取模块填写相关信息!");
                return;
            }
            if (Version == "")
            {
                MessageBox.Show("您的Chia(奇亚)程序版本未填写,请前往密钥获取模块填写相关信息!");
                return;
            }

            if (driver_SSD_lable.Text == "")
            {
                MessageBox.Show("您修改的内容未保存,请保存");
                return;
            }
            if (driver_lable.Text == "")
            {
                MessageBox.Show("您修改的内容未保存,请保存");
                return;
            }
            if (comboBox1.Text == "") {
                MessageBox.Show("请选择田大小");
                return;

            }
            if (comboBox2.Text == "")
            {
                MessageBox.Show("请选择线程数");
                return;

            }

            if (_jobManageModel.DriveLetter == null || _jobManageModel.DriveLetter.Count < 1)
            {
                MessageBox.Show("请选择最少一个盘符");
                return;
            }
            if (_jobManageModel.IsJobCheck != true)
            {
                MessageBox.Show("您的任务数未配置,将按照默认10个任务数进行!");
            }
            string info = string.Format(@"
任务预览:
账户:{0} 
密钥1:{6}
密钥2:{7}
缓存盘符: 
{1}  
写入盘符:  
{2}  
任务执行方式 {5}
每个硬盘写入数:  {3} 
任务间隔:{8}
任务线程:{9}
计划开始时间: {4}   
 ", _jobManageModel.Fingerprint, driver_SSD_lable.Text, driver_lable.Text, _jobManageModel.JobNum, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), _jobManageModel.ModeType == 0 ? "并发队列模式" : "并发执行模式", _jobManageModel.FarmerKey, _jobManageModel.PoolKey, _jobManageModel.sjjiang,_jobManageModel.ThreadNum);
            //Job_Log.Text += info;
            if (MessageBox.Show(info, "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.None) == DialogResult.OK)
            {
                if (_jobManageModel.IsOk == 1)
                {
                    MessageBox.Show("当前已有任务正在进行中,如您的任务已经在进行,或者想在加任务,请退出程序,重新开始(已开启的任务将不会收到影响!)");
                    return;
                }
                if (BaseConfig.isok == false)
                {
                    MessageBox.Show("禁止开启任务");
                    return;
                }

                var cmdinfo = CmdHelper.OpenCmdStart(Application.StartupPath + @"\Pdiscinfo\", Administrator, Version, _jobManageModel);
              //  Job_Log.Text = cmdinfo ? "任务开始中" : "任务执行错误";
                _jobManageModel.IsOk = 200;
                Thread.Sleep(2000);
                ExportCommon.DeleteDirectory(Application.StartupPath + @"\Pdiscinfo\");
            }
            else
            {
                MessageBox.Show("已取消该任务.");
            }
        }
        #region   配置 信息 方法
        /// <summary>
        /// 配置信息读取
        /// </summary>
        public void ConfigInfo()
        {
            _SetInfoConfig = new DBConfig(Application.StartupPath + @"\Setinfo.ini");
            _jobManageModel.Fingerprint = _dBConfig.IniReadValue("ChiaKey", "Fingerprint");
            _jobManageModel.FarmerKey = _dBConfig.IniReadValue("ChiaKey", "FarmerKey");
            _jobManageModel.PoolKey = _dBConfig.IniReadValue("ChiaKey", "PoolKey");
            string guidtime = _dBConfig.IniReadValue("ChiaKey", "GuidTime");
            if (MD5Helper.MD5(_jobManageModel.Fingerprint) != guidtime)
            {
                MessageBox.Show("非法使用");
                Fingerprint_text.Enabled = false;
                return;
            }
            _jobManageModel.Administrator = _dBConfig.IniReadValue("ChaiInfo", "Administrator");
            _jobManageModel.Version = _dBConfig.IniReadValue("ChaiInfo", "appversion");
            _jobManageModel.sjjiang = _SetInfoConfig.IniReadValue("BaseConfig", "jiange");

            _jobManageModel.KModel = _SetInfoConfig.IniReadValue("BaseConfig", "KModel");
            _jobManageModel.ThreadNum = _SetInfoConfig.IniReadValue("BaseConfig", "ThreadNum");
            _jiange.Text = _jobManageModel.sjjiang;
            comboBox1.Text = _jobManageModel.KModel;
            comboBox2.Text = _jobManageModel.ThreadNum;
            Fingerprint_text.Text = _jobManageModel.Fingerprint;
            Fingerprint_text.Enabled = false;
            FarmerKey.Text = _jobManageModel.FarmerKey;
            PoolKey.Text = _jobManageModel.PoolKey;
            add_drivecache = new List<string> { };
            add_SSDDrivecachetem = new List<string> { };
            // 配置信息  
            _jobManageModel.JobNum = _SetInfoConfig.IniReadValue("BaseConfig", "JobNum") == "" ? 0 : int.Parse(_SetInfoConfig.IniReadValue("BaseConfig", "JobNum"));
            _jobManageModel.ModeType = _SetInfoConfig.IniReadValue("BaseConfig", "ModeType") == "" ? 0 : int.Parse(_SetInfoConfig.IniReadValue("BaseConfig", "ModeType"));
            if (_jobManageModel.ModeType == 0)
            {
                radioButton3.Checked = true;
            }
            else
            {
                radioButton4.Checked = true;
            }
            switch (_jobManageModel.JobNum)
            {
                case 1:
                    this.radioButton1.Checked = true;
                    break;

                case 3:
                    this.radioButton3.Checked = true;
                    break;

                case 5:

                    this.radioButton5.Checked = true;
                    break;

                default:

                    this.radioButton_more.Checked = true;
                    comboBox_JobNum.Text = _jobManageModel.JobNum.ToString();
                    break;
            }
            var drive_count = _SetInfoConfig.IniReadValue("DriveJX", "DriveLetterCount") == "" ? 0 : int.Parse(_SetInfoConfig.IniReadValue("DriveJX", "DriveLetterCount"));
            Drivie_2.Text = "";
            for (int i = 0; i < drive_count; i++)
            {
                var currtue = _SetInfoConfig.IniReadValue("DriveJX", "DriveLetter" + (i));

                Drivie_2.Text += "\n\t存储盘信息:\n\t" + currtue + " 总容量: " + Common.HumanReadableFilesize(HardDiskPartition.GetHardDiskSpace(currtue));
                Drivie_2.Text += "  剩余容量: " + Common.HumanReadableFilesize(HardDiskPartition.GetHardDiskFreeSpace(currtue));
                if (currtue != "")
                {
                    add_drivecache.Add(currtue);
                }
                add_drive = add_drivecache;
                _jobManageModel.DriveLetter = add_drivecache;

            }
            driver_lable.Text = "";
            Dirvie_info.Text = "";
            var lableinfo = "";
            foreach (var item in add_drivecache)
            {
                lableinfo += item + "\n";
            }
            driver_SSD_lable.Text = "";
            ///SSD 缓存
            var ssddrive_count = _SetInfoConfig.IniReadValue("DriveSSD", "CacheDriveCount") == "" ? 0 : int.Parse(_SetInfoConfig.IniReadValue("DriveSSD", "CacheDriveCount"));
            for (int i = 0; i < ssddrive_count; i++)
            {
                var currtue = _SetInfoConfig.IniReadValue("DriveSSD", "CacheDrive" + (i));

                if (currtue != "")
                {
                    add_SSDDrivecachetem.Add(currtue);
                    driver_SSD_lable.Text += currtue + "\n";
                }
                add_SSDDrivecache = add_SSDDrivecachetem;
                _jobManageModel.CacheDrive = add_SSDDrivecachetem;

                string info = string.Format(@" 
缓存盘信息
磁盘:{0} 
总容量:  {1}  
剩余容量:  {2} ", currtue, Common.HumanReadableFilesize(HardDiskPartition.GetHardDiskSpace(currtue)), Common.HumanReadableFilesize(HardDiskPartition.GetHardDiskFreeSpace(currtue)));
                Dirvie_info.Text += info;
            }
            driver_lable.Text = lableinfo;

        }

        #endregion

        #region 刷新
        /// <summary>
        /// 刷新磁盘信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button4_Click(object sender, EventArgs e)
        {
            ConfigInfo();
        }

        #endregion

        #region  按钮提示

        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            MessageBox.Show("如不清楚您的密钥,可以点击上方密钥获取当前账户信息");

        }

        private void linkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            MessageBox.Show(@"
                任务数的执行跟您的磁盘内容有关联,如您有2个SSD固态硬盘,4个机械硬盘,选择自定义任务,输入10个任务.
                则当前的任务实际开启数量是.
                1个 SSD固态 对2个机械硬盘进行数据写入,SSD固态对每个机械硬盘执行1个任务,循环10次
                (任务越多,时间越长,任务越少,时间越短)
              ");
        }

        private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            MessageBox.Show("建议您选择SSD固态硬盘,并设置根目录为指定目录,Tips:(目前仅支持大于等于2个SSD固态硬盘的选择)");

        }

        /// <summary>
        /// 并发任务计算
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void linkLabel4_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            MessageBox.Show(@" 
并发队列执行:  根据您选择的磁盘数,以及任务数, 同时的进行,同时按照您选择的任务数,可以进行队列等待(合理的任务数,可以开启一次,直到P满硬盘)
并发执行:      根据您选择的磁盘数,以及任务数, 同时的进行,任务一旦完成,则停止



提示:
    任务开启阶段,不能够打断,否则需要删除写在SSD的所有.tmp文件,避免磁盘文件被占用.

");
        }

        private void linkLabel5_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            MessageBox.Show("建议您选择机械硬盘,并设置根目录为指定目录,建议您按照2固态 -> 4机械的方案来进行任务的创建 ");
        }

        #endregion

        #region  下拉框选择
        /// <summary>
        /// 下拉框选择
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void comboBox_JobNum_SelectedValueChanged(object sender, EventArgs e)
        {
            try
            {
                _jobManageModel.JobNum = int.Parse(this.comboBox_JobNum.Text);

            }
            catch (Exception ex)
            {
                ExportCommon.Exportfun(System.Environment.CurrentDirectory + "/error.log", ex.Message);
                _jobManageModel.JobNum = 0;
            }
        }

        #endregion

        #region  清楚选择的盘符


        /// <summary>
        /// 清除选择的盘符
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button6_Click(object sender, EventArgs e)
        {
            add_SSDDrivecachetem = new List<string> { };

            add_SSDDrivecache = new List<string> { };
            driver_SSD_lable.Text = "";
        }

        /// <summary>
        /// 清除选择的盘符
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button5_Click(object sender, EventArgs e)
        {
            add_drive = new List<string> { };
            driver_lable.Text = "";

        }

        #endregion

        private void comboBox1_TextChanged(object sender, EventArgs e)
        {
            _jobManageModel.KModel = comboBox1.Text.Trim();
            switch (comboBox1.Text)
            {
                case "32":

                    label10.Text = "此文件将需要240GB硬盘容量";
                    break;

                case "33":

                    label10.Text = "此文件将需要521GB硬盘容量";
                    break;

                case "34":

                    label10.Text = "此文件将需要1041GB硬盘容量";
                    break; 
                case "35":
                    label10.Text = "此文件将需要2400GB硬盘容量";

                    break;
                default:
                    label10.Text = "现在的p盘文件类型不对";
                    break;
            }
        }

        private void comboBox2_TabStopChanged(object sender, EventArgs e)
        {            
                 _jobManageModel.ThreadNum = comboBox2.Text.Trim();
        }
    }
}
